Skip to content

fix(VWindow): prevent swipe navigation when scrolling a child element - #23075

Open
waterWang wants to merge 1 commit into
vuetifyjs:masterfrom
waterWang:fix/21888-chipgroup-window-touch
Open

fix(VWindow): prevent swipe navigation when scrolling a child element#23075
waterWang wants to merge 1 commit into
vuetifyjs:masterfrom
waterWang:fix/21888-chipgroup-window-touch

Conversation

@waterWang

Copy link
Copy Markdown
Contributor

Description

When a VWindow contains a horizontally scrollable child element (such as a VBtnToggle or VSlideGroup), swiping to scroll the child also triggers the VWindow's swipe gesture, causing an unintended window navigation.

Reproduction

  1. Create a VWindow with a VBtnToggle inside (or any horizontally scrollable element)
  2. On mobile, swipe horizontally on the scrollable child
  3. The VWindow navigates to the next/previous item instead of scrolling the child

Fix

This fix detects whether the touch gesture started inside a scrollable child element. If the child element was scrolled during the gesture, the VWindow swipe is suppressed, allowing the child to handle the scroll naturally.

References

Testing

  • On desktop: VWindow navigation via arrows and swipe still works as expected
  • On mobile: scrolling a horizontally scrollable child inside a VWindow no longer triggers window navigation
  • The fix only applies when the touch target is inside a scrollable element that actually scrolls

When a VWindow contains a horizontally scrollable child element (such as
a VBtnToggle or VSlideGroup), swiping to scroll the child also triggers
the VWindow's swipe gesture, causing an unintended window navigation.

This fix detects whether the touch gesture started inside a scrollable
child element. If the child element was scrolled during the gesture, the
VWindow swipe is suppressed, allowing the child to handle the scroll
naturally.

fixes vuetifyjs#21888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report][3.9.4] chipgroup in window, slide chips cause toggle window item on mobile

1 participant